<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站后台管理系统</title>
<style type="text/css"></style>
<script type="text/javascript" src="/manage/js/jquery-1.4.2.min.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="/manage/js/DD_belatedPNG.js" ></script>
<script type="text/javascript">
DD_belatedPNG.fix('.logo,.top .right a,.modify a.password,.modify a.edit');
</script>
<![endif]-->
<link href="/manage/css/admin.css" rel="stylesheet" type="text/css" />
<base target="mainpage"/>
</head>
<body>
<div class="top">
	<div class="logo"></div>
    <div class="clear"></div>
    <div class="nav">
    	<ul>
        	<li class="cur"><a href="/manage/system.html?hcs=<?=$htdocs['id']?>">后台首页</a></li>
            <!--<li><a href="javascript:void(0);">应用中心</a></li>-->
        </ul>
        <div class="welcome">欢迎你,<?=$username?></div>
        <div class="modify"><a href="/manage/password.html?hcs=<?=$htdocs['id']?>" class="password">修改密码</a></div>
	    <div class="right"><a href="/manage/quit.html" target="_top" class="exit">退出</a></div>
    </div>
</div>
<div class="layout">
<div class="left">
	<h3>后台首页</h3>
    <dl>
      <?php
      foreach($nav as $key=>$value){
      ?>
      <dt cat="<?=$key?>" show="n"><span><?=$value['name']?></span></dt>
      	<?php
      	foreach($value['child'] as $k=>$v){
      	?>
      	<dd cat="<?=$key?>"><a href="<?=$v['value']?>&hcs=<?=$htdocs['id']?>"><?=$v['name']?></a></dd>
      	<?php
      	}
      	?>
      <?php
      }
      ?>
    </dl>
</div>
<div class="main">
<iframe name="mainpage" id="mainpage" src="/manage/system.html?hcs=<?=$htdocs['id']?>" frameborder="0" allowtransparency="true"></iframe>
</div>
</div>
<div class="footer">Powered by 雅昌艺术网 2.1 | Template designed by 雅昌艺术网 </div>
<script type="text/javascript">
//展开同级的dd
$(".left dt").click(function(){
	var c = $(this).attr('cat');
	var show = $(this).attr('show');
	if(show != 'y') {
		$('dd[cat='+c+']').slideDown(200);
		$(this).attr('show','y');
	}else {
		$('dd[cat='+c+']').slideUp(200);
		$(this).attr('show','n');
	}
	$('a').removeClass('over');
	//$(this).addClass('over');
});

//子菜单点击时
$('dd[cat] a').click(function(){
	var c = $(this).parent('dd').attr('cat');
	$('a').removeClass('over');
	$(this).addClass('over');
	return true;
});

$(window).resize(function(){
	var totalHeight = document.body.scrollHeight;
	var wl = $('.left').width();
	var ww = $('.layout').width();
	//var h = $('.left').height(totalHeight-114);
	$('.main iframe ').width(ww-wl-20).height(totalHeight-130);

}).resize();

$('dt span').click(function(){
	setTimeout(function(){
		var h = $('.left').height();
		//$('.main iframe ').height(h);
	} ,200 );

	//$(window).resize();
});

document.onkeydown = function (event){
	if (event.keyCode==116){
        event.keyCode = 0;
        event.cancelBubble = true;
        return false;
    }
}

$(document).keydown(function(evt){
	if(evt.keyCode==116) {
		evt.keyCode = 0;
        evt.cancelBubble = true;
		document.getElementById('mainpage').contentWindow.location.reload(true);
		return false;
	}

	return true ;
});
$('#tulu').click(function(){
		var finder = new CKFinder() ;
		finder.basePath = '/manage/js/ckfinder/'; //导入CKFinder的路径
		finder.popup() ;
});
$('#huigu').click(function(){
	$('iframe').attr('src','?/content/lists/33');
});
</script>
</body>
</html>